package io.kubesphere.devops.core;

import javax.servlet.*;
import java.io.IOException;

public class CommonFilter implements Filter {
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        DynamicDataSourceContextHolder.clearDataSourceKey();
        DynamicDataSourceContextHolder.routeMaster();
        filterChain.doFilter(servletRequest,servletResponse);
    }
}
